#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/time.h>

int getTimeMs()
{
	struct timeval tv;
    gettimeofday(&tv,NULL);
    int ms = tv.tv_sec*1000 + tv.tv_usec/1000;
    return ms;
}
    
int main(int argc, char *argv[])
{
	int n = atol(argv[1]);
    int start = getTimeMs();
	int k = 0;
	for ( int i = 0; i < n; i++) {
		k ++;
    }
    int timeCost = getTimeMs() - start;
	printf("timeCost = %d ms\n", timeCost);
	return 0;
}



